package com.onlyphoto.onlymall.mvp.model

import com.onlyphoto.onlymall.api.Urls
import com.onlyphoto.onlymall.base.BaseEntity
import com.onlyphoto.onlymall.base.BaseModel
import com.onlyphoto.onlymall.base.BaseObserver
import com.onlyphoto.onlymall.bean.request.PwdBean
import com.onlyphoto.onlymall.utils.ConfigUtil
import com.onlyphoto.onlymall.utils.RxTransformer


class MSetPwdImpl : BaseModel() {
    fun setPwd(bean: PwdBean, baseObserver: BaseObserver<BaseEntity>) {
        val url = ConfigUtil.instance.getUrl(Urls.PWD)
        apiService().setPwd(url, bean.toMap())
                .compose(RxTransformer.switchSchedulers(this))
                .subscribe(baseObserver)
    }
}
